// brandStore

export const useBrandStore = defineStore('brand', () => {
  const { $request } = useNuxtApp()
  const brands = ref([])

  // 接口获取brand
  const fetchBrand = async () => {
    try {
      const response = await $request.post('/api/v1/mfg/mfgdetailasync')
      brands.value = response.Data
    } catch (error) {
      console.error('Error fetching manufacturers:', error)
    }
  }

  return {
    brands,
    fetchBrand
  }
})